package com.wlkj.action.bbs;

import java.util.HashMap;
import java.util.Map;

import com.jfinal.core.Controller;
import com.jfinal.kit.HttpKit;
import com.jfinal.kit.JsonKit;
import com.wlkj.config.UrlKit;

public class BbsAction extends Controller {
	public void getType() {
		String param = HttpKit.readData(this.getRequest());
		String result = HttpKit.post(UrlKit.getBbsType, param);
		renderJson(result);
	}

	public void testGetPageList() {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("partyid", "c798f73240cfaeb607cc01e3ab5d");
		map.put("pgn", 1);
		map.put("pgs", 5);
		String result = HttpKit
				.post(UrlKit.getBbsPageList, JsonKit.toJson(map));
		renderText(result);
	}

	public void getPageList() {
		String param = HttpKit.readData(this.getRequest());
		String result = HttpKit.post(UrlKit.getBbsPageList, param);
		renderJson(result);
	}
	public void getPageList2() {
		String param = HttpKit.readData(this.getRequest());
		String result = HttpKit.post(UrlKit.getBbsPageList2, param);
		renderJson(result);
	}


	public void getContent() {
		String param = HttpKit.readData(this.getRequest());
		String result = HttpKit.post(UrlKit.getBbsContent, param);
		renderJson(result);
	}

	public void publish() {
		String param = HttpKit.readData(this.getRequest());
		String result = HttpKit.post(UrlKit.bbsPublish, param);
		renderJson(result);
	}

	public void remove() {
		String param = HttpKit.readData(this.getRequest());
		String result = HttpKit.post(UrlKit.remove, param);
		renderJson(result);
	}

	public void getMyPageList() {
		String param = HttpKit.readData(this.getRequest());
		String result = HttpKit.post(UrlKit.getMyBbsPageList, param);
		renderJson(result);
	}

	public void getMyCollectPageList() {
		String param = HttpKit.readData(this.getRequest());
		String result = HttpKit.post(UrlKit.getMyCollectBbsPageList, param);
		renderJson(result);
	}
}
